#include <header.h>


int number = 0;

void *fun1(void *){
    int cnt = 10000000;
    while(cnt--)
    {
        ++number;
        /* printf("+++++++++number = %d\n",number); */
    }
    return NULL;
}

void *fun2(void *){
    int cnt = 10000000;
    while(cnt--)
    {

        ++number;
        /* printf("--------number = %d\n",number); */
    }
    return NULL;
}


int main(){


    pthread_t pthid1, pthid2;
    pthread_create(&pthid1, NULL, fun1, NULL);
    pthread_create(&pthid2, NULL, fun2, NULL);

    pthread_join(pthid1, NULL);
    pthread_join(pthid2, NULL);

    printf("main thread: gNumber: %d\n", number);

    printf("\n");
        return 0;
}

